#ifndef TOUCHITEM_H
#define TOUCHITEM_H

#include <QtGui/QColor>
#include <QtGui/QGraphicsItem>
#include <QObject>

class TouchItem : public QObject, public QGraphicsPixmapItem
{
    Q_OBJECT
public:
    explicit TouchItem(int x, int y, QString title);
    virtual ~TouchItem();

    QRectF boundingRect() const;
    QPainterPath shape() const;

protected:
    virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);

private:
    int x, y;
    QString title;
    int commonAlpha;
    int clickedAlpha;
    QSharedPointer<QPixmap> commonPixmap;
    QSharedPointer<QPixmap> clickedPixmap;
    QPixmap * curPixmap;
signals:
    void clicked();

public slots:

};

#endif // TOUCHITEM_H
